package com.example.ibsp_demo.controller.create.jump;

import com.example.ibsp_demo.mapper.content.ContentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/jump")
@CrossOrigin(origins = "http://localhost:8080")
public class ContetnJumpController {

    @Autowired
    private ContentMapper  contentMapper;

    // 跳转到内容详情页
    @PostMapping("/getCtid")
    public String contentDetail(@RequestParam("ctitle") String ctitle) {
        Integer ctid = contentMapper.selectCtidByCtitle(ctitle);
        return ctid.toString();
    }


}
